package org.opens.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import java.util.Date;

/**
 * 功能:
 *
 * @author zym
 * @Date 2022/6/28 15:45
 */
@Data
public class RedisCacheSaveDTO {

    private String name;

    @Max(value = 100, message = "年龄最大只能为100")
    @Min(value = 1, message = "年龄最小只能为1")
    private Integer age;

    private String address;

    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date birthdayDate;

}
